<template>
	<div>
		<el-form
			ref="form"
			:inline="true"
			:model="queryData"
			label-width="100px"
		>
            <el-form-item label="教程状态">
				<el-input />
			</el-form-item>
			<el-form-item label="教程名称">
				<el-input />
			</el-form-item>
			<el-form-item>
				<el-button
					type="primary"
					icon="el-icon-search"
					size="medium"
					@click="search(queryData)"
				>
					{{ $t('common.search') }}
				</el-button>
				<el-button
					icon="el-icon-refresh-left"
					size="medium"
					@click="reset()"
				>
					{{ $t('common.reset') }}
				</el-button>

			</el-form-item>
		</el-form>
		<TableContainer
			:columns="columns"
			v-bind="tableProps"
		>
		</TableContainer>
	</div>
</template>

<script>
import TableContainer, { manager, initTableProps } from '@/components/TableContainer'
export default {
	components: {
		TableContainer
	},
	data() {
		return {
			show: false,
			queryData: {
				userName: undefined
			},
			tableProps: initTableProps(),
			columns: [
				{
					label: '教程名称',
					prop: 'userName'
				},
				{
					label: '创建人',
					prop: 'realName'
				},
				{
					label: '创建时间',
					prop: 'merchantId'
				},
                {
					label: '最后操作人',
					prop: 'merchantId'
				},
                {
					label: '最后操作时间',
					prop: 'merchantId'
				},
                {
					label: '教程状态',
					prop: 'merchantId'
				}
			]
		}
	},
	mounted() {
		const { fetchApi } = manager({
			api: this.$api.memberListAPI, // 接口地址
			tableProps: this.tableProps, // table props
			defaultParams: this.queryData // 接口参数
		})
		this.search = fetchApi
	}
}
</script>

<style scoped lang="scss"></style>
